import request from "@/utils/request";
import type { ILoginParmas, IUserListResData, IConmmonRoleRes } from "./type";


const BASE_URL = "/auth";

export const login = (data: ILoginParmas) =>
  request.post<any, IUserListResData>(BASE_URL + "/login", data);

export const refreshToken = (data: string) =>
  request.get<any, IConmmonRoleRes>(BASE_URL + "/refresh", {
    params: { token: data },
  });

export const logout = () =>
  request.post<any, IConmmonRoleRes>(BASE_URL + "/logout");
